
var ShowOrder = new Class({

    initialize: function(orderid, target) {
        if(!orderid) return;

        new Request({
            url: '/Admin/webstat/getFromMySQL',
            method: 'get',
            onRequest: function() {
                target.addClass('load');
            },
            onComplete: function(resp) {
                target.removeClass('load');

                this.showOrder(resp);
            }.bind(this)
        }).send('table=order&oid=' + orderid + '&nc=' + Date.now());

    },
    showOrder: function(resp) {

        new ModalBox({
            width: 700,
            modal: {
                background: '#555'
            }
        }).doBox('<h2>&nbsp;</h2>', resp);
    }
});

